storing and receiving FB

49

import { getDatabase, ref, onValue } from 'firebase/database';

function storeHighScore(userId, score) {
  const db = getDatabase();
  const reference = ref(db, 'users/' + userId);
  set(ref(db, 'users/' + userId), {
    highscore: score,
  });
}

Comments

Submit
0 Comments